A relational database is a database that organizes data using characteristics that are shared by data. For example, a data set containing information about online sales might be grouped by the date a sales transaction occurred, by the products sold, by the buyer's last name, by the payment method, and so on. A relational database organizes data according to relations. A relation may be defined as a set of tuples of data items that have the same attributes. SQL (Structured Query Language) is one tool for retrieving information from relational databases. SQL terminology corresponds with relational database terminology, e.g., SQL tables correspond to relational database relations, SQL rows correspond to tuples, and SQL columns correspond to attributes.
Relational databases are used in many contexts. For example, On-Line Transactional Processing (OLTP) systems are designed and optimized for fast transactional input to relational databases (and other databases) to support business transactions. On-Line Analytical Processing (OLAP) systems are designed and optimized for fast data output to support data analytics and reporting. On-Line Analytical Processing is sometimes referred to without hyphenation as Online Analytical Processing, and despite the name, it does not necessarily require an online data source or other online component.
OLAP derives a multidimensional cube by processing data from a relational database or data warehouse to place measures into dimensions. In the cube the measures are pre-aggregated, which makes data retrieval significantly faster, although some flexibility is generally lost due to the choices made when dimensions are selected and data aggregated. A user may be unable to browse or filter data using database attributes which are not transformed into cube dimensions. The processed cube can be made available to users who can browse the data in the cube. The basic elements of an OLAP cube are measures, dimensions, and schema. Measures are key performance indicators to evaluate in aggregate, e.g., volume, sales, and cost. Dimensions are categories of data analysis, such as the “by” categories in reports, e.g., product, time, and region. For example, in a revenue report by month and by sales region, two dimensions are time and sales region.
As a design practice, an OLAP cube should have relatively few dimensions, e.g., no more than ten or twelve dimensions. A cube with more than about twelve dimensions may be difficult to understand and browse. Too many dimensions can cause confusion among users. Having too many dimensions can also lead to a data explosion, because the amount of data grows exponentially as the number of dimensions increases.